package com.dfbz.demo;

import java.io.File;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo02_File类获取信息的方法 {
    public static void main(String[] args) {

        File file = new File("./000.txt");
//        File file = new File("D:\\000\\curl-7.73.0-win64-mingw.zip");

        System.out.println(file.getAbsolutePath());     // D:\000
        System.out.println(file.getPath());             // D:\000
        System.out.println(file.getName());             // curl-7.73.0-win64-mingw.zip
        System.out.println(file.length());              // 3530222
    }

    // E:\BaiduNetDiskWorkspace\workspace_class\Java55\day13_线程等待_状态_线程池_File类\000.txt
}
